// +---------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +---------------------------------------------------------------------
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +---------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +---------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------

import LayoutMain from '@/layout';
import setting from '@/setting';

let routePre = setting.routePre;

const meta = {
  auth: true,
};

let pre = 'article_';

const articleType = {
  path: routePre + '/article/cate',
  name: 'articleType',
  header: 'articleType',
  redirect: {
    name: `${pre}_cate_list`,
  },
  meta,
  component: LayoutMain,
  children: [
    {
      path: 'list',
      name: `${pre}_cate_list`,
      meta: {
        auth: ['admin-article-cate-list'],
        title: '文章分类',
      },
      component: () => import('@/pages/article/type/index'),
    },
  ],
};

const article = {
  path: routePre + '/article/index',
  name: 'article',
  header: 'article',
  redirect: {
    name: `${pre}list`,
  },
  meta,
  component: LayoutMain,
  children: [
    {
      path: 'list',
      name: `${pre}list`,
      meta: {
        auth: ['admin-article-index-list'],
        title: '文章管理',
      },
      component: () => import('@/pages/article/article/index'),
    },
  ],
};

export { articleType, article };
